package cn.auction.dao;

import cn.auction.entity.Auction;
import cn.auction.entity.AuctionRecord;
import cn.auction.entity.AuctionUser;
import cn.auction.util.Page;

import java.util.List;

public interface AuctionDao {
    //添加一条拍卖信息
    void insert(Auction auction) throws Exception;
    //添加一条竞拍信息
    void insert(AuctionRecord auctionRecord) throws Exception;

    //分页查询拍卖信息
    Page<Auction> selectByPage(Auction auction, int pageIndex) throws Exception;

    //根据拍卖品编号查询拍卖信息
    Auction selectAuctionById(Long auctionId) throws Exception;
    //根据拍卖品编号查询竞拍表信息
    List<AuctionRecord> selectAuctionRecordByAuctionId(Long auctionId) throws Exception;

    //查询拍卖品信息，当竞拍结束时间小于当前时间时
    List<Auction> selectAuctionByTimeOver(AuctionUser auctionUser)throws Exception;
    //查询拍卖品信息，当竞拍结束时间大于当前时间时
    List<Auction> selectAuctionByIntime(AuctionUser auctionUser)throws Exception;
}
